package com.liu;

import java.nio.charset.StandardCharsets;
import java.util.Arrays;

/**
 * @author LIU
 * @version 1.0.0
 * @date 2025/6/16
 */
public class Main {
    public static void main(String[] args) {
        byte[] bytes = "测试".getBytes(StandardCharsets.UTF_8);
        for (byte aByte : bytes) {
            System.out.println(aByte);
        }
        System.out.println(Arrays.toString(bytes));

        System.out.println("=========== 二进制转文字 ==========");
        byte[] bytes1 = {-26, -75, -117, -24, -81, -107};

        String s = new String(bytes1, StandardCharsets.UTF_8);

        System.out.println(s);
    }
}
